/*     */ package com.yss.sofa.cml.print;
/*     */ 
/*     */ import com.yss.sofa.cml.SerializableObject;
/*     */ import com.yss.sofa.cml.geom.Shape;
/*     */ import java.util.ArrayList;
/*     */ import java.util.List;
/*     */ 
/*     */ public abstract class PrintElement
/*     */   implements SerializableObject
/*     */ {
/*     */   private static final long serialVersionUID = 1L;
/*     */   protected int x;
/*     */   protected int y;
/*     */   protected int width;
/*     */   protected int height;
/*     */   private boolean splited;
/*     */   private boolean force;
/*     */   private int left;
/*     */   private int top;
/*  19 */   private byte position = 0;
/*     */   private byte splitedPosition;
/*     */   private ArrayList<Shape> shapes;
/*     */ 
/*     */   public int getX()
/*     */   {
/*  24 */     return this.x;
/*     */   }
/*     */ 
/*     */   public int getY() {
/*  28 */     return this.y;
/*     */   }
/*     */ 
/*     */   public int getWidth() {
/*  32 */     return this.width;
/*     */   }
/*     */ 
/*     */   public void setWidth(int width) {
/*  36 */     this.width = width;
/*     */   }
/*     */ 
/*     */   public int getHeight() {
/*  40 */     return this.height;
/*     */   }
/*     */ 
/*     */   public void setHeight(int height) {
/*  44 */     this.height = height;
/*     */   }
/*     */ 
/*     */   public void setX(int x) {
/*  48 */     this.x = x;
/*     */   }
/*     */ 
/*     */   public void setY(int y) {
/*  52 */     this.y = y;
/*     */   }
/*     */   public abstract <T> void accept(PrintElementVisitor<T> paramPrintElementVisitor, T paramT);
/*     */ 
/*     */   public void setSplited(boolean splited) {
/*  58 */     this.splited = splited;
/*     */   }
/*     */ 
/*     */   public boolean isSplited() {
/*  62 */     return this.splited;
/*     */   }
/*     */ 
/*     */   public void setForce(boolean force) {
/*  66 */     this.force = force;
/*     */   }
/*     */ 
/*     */   public boolean isForce() {
/*  70 */     return this.force;
/*     */   }
/*     */ 
/*     */   public int getLeft() {
/*  74 */     return this.left;
/*     */   }
/*     */ 
/*     */   public int getTop() {
/*  78 */     return this.top;
/*     */   }
/*     */ 
/*     */   public void setLeft(int left) {
/*  82 */     this.left = left;
/*     */   }
/*     */ 
/*     */   public void setTop(int top) {
/*  86 */     this.top = top;
/*     */   }
/*     */ 
/*     */   public boolean isTop() {
/*  90 */     return (this.position & 0x8) > 0;
/*     */   }
/*     */ 
/*     */   public boolean isRight() {
/*  94 */     return (this.position & 0x4) > 0;
/*     */   }
/*     */ 
/*     */   public boolean isLeft() {
/*  98 */     return (this.position & 0x2) > 0;
/*     */   }
/*     */ 
/*     */   public boolean isBottom() {
/* 102 */     return (this.position & 0x1) > 0;
/*     */   }
/*     */ 
/*     */   public void isTop(boolean b) {
/* 106 */     this.position = (byte)(this.position | (b ? 8 : 0));
/*     */   }
/*     */ 
/*     */   public void isRight(boolean b) {
/* 110 */     this.position = (byte)(this.position | (b ? 4 : 0));
/*     */   }
/*     */ 
/*     */   public void isLeft(boolean b) {
/* 114 */     this.position = (byte)(this.position | (b ? 2 : 0));
/*     */   }
/*     */ 
/*     */   public void isBottom(boolean b) {
/* 118 */     this.position = (byte)(this.position | (b ? 1 : 0));
/*     */   }
/*     */ 
/*     */   public void addShape(Shape shape) {
/* 122 */     if (this.shapes == null) {
/* 123 */       this.shapes = new ArrayList();
/*     */     }
/* 125 */     this.shapes.add(shape);
/*     */   }
/*     */ 
/*     */   public void addAllShape(List<Shape> shape) {
/* 129 */     if (this.shapes == null) {
/* 130 */       this.shapes = new ArrayList();
/*     */     }
/* 132 */     this.shapes.addAll(shape);
/*     */   }
/*     */ 
/*     */   public List<Shape> getShapes() {
/* 136 */     return this.shapes;
/*     */   }
/*     */ 
/*     */   public void isSplitedBottom(boolean b) {
/* 140 */     this.splitedPosition = (byte)(this.splitedPosition | (b ? 1 : 0));
/*     */   }
/*     */ 
/*     */   public void isSplitedRight(boolean b) {
/* 144 */     this.splitedPosition = (byte)(this.splitedPosition | (b ? 4 : 0));
/*     */   }
/*     */ 
/*     */   public boolean isSplitedBottom() {
/* 148 */     return (this.splitedPosition & 0x1) > 0;
/*     */   }
/*     */ 
/*     */   public boolean isSplitedRight() {
/* 152 */     return (this.splitedPosition & 0x4) > 0;
/*     */   }
/*     */ }

/* Location:           X:\repository\com\yss\sofa\cml\cml-api\1.1.0\cml-api-1.1.0.jar
 * Qualified Name:     com.yss.sofa.cml.print.PrintElement
 * JD-Core Version:    0.6.0
 */